<?php
	SetCookie("CHECK","",time()-1);
//	SetCookie("UN", "", time()-1); 
	SetCookie("PWD", "", time()-1);
	SetCookie("SAVEPWD","",time()-1);
	SetCookie("SEX", "", time()-1);
	SetCookie("NO", "", time()-1);
	SetCookie("EMAIL", "", time()-1);
	SetCookie("REALNAME", "", time()-1);
	SetCookie("PURVIEW", "", time()-1);
	SetCookie("PHONE", "", time()-1);
	SetCookie("DEPT", "", time()-1);
	SetCookie("MAJOR", "", time()-1);
	SetCookie("PORTRAIT", "", time()-1);

	$connection = mysql_connect("127.0.0.1","root","zhy19910209");
	mysql_select_db("exam_schema",$connection);
	$U_name = $_COOKIE["UN"];
	mysql_query("UPDATE User SET state = '0' WHERE User_Name = '$U_name';");
			
	echo "<script language = \"javascript\">
		window.location.href = \"index.php\";
	</script>";
?>